package com.bnz.factory;

import com.bnz.pojo.Student;

public class StudentFactory {
    // 1. 静态工厂方法
    public static Student getInstance(){
        Student student = new Student();
        student.setSname("张飞");
        return student;
    }
    // 2. 工厂方法
    public Student getStudent(){
        Student student = new Student();
        student.setSname("关羽");
        return student;
    }

}
